import request from '@/utils/request.ts'
import { ILoginParams } from '@/types/user'
enum API {
    LOGIN_URL = '/api/v1/system/user/login',
    GETMENU_URL = '/api/v1/system/user/getrout',
    CHANGEPASSWORD_URL = '/api/v1/system/user/changePassword'
}
//用户登录
export function login(data: ILoginParams) {
    return request({
        url: API.LOGIN_URL,
        method: 'post',
        data
    })
}
//用户路由
export function getMenu() {
    return request({
        url: API.GETMENU_URL,
        method: 'get'
    })
}

// 修改密码
export const changePassword = (data: any) => {
    return request({
        url: API.CHANGEPASSWORD_URL,
        method: 'post',
        data,
    })
}